home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Developer Utilities / Installer 4.0.3 SDK / DeveloperInterfaces / CIncludes / ActionAtomHeader.h next >
Encoding:
C/C++ Source or Header  |  1994-11-15  |  2.7 KB  |  111 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ActionAtomHeader.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    Kevin Aitken
  7.  
  8.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <3>    11/22/93    KBA        Updated interface for MakeFSSpecFromFileSpecID().
  13.          <2>    11/16/93    rdm        Added callback routines for MakeFSSpecFromFileSpecID,
  14.                                     SuspendWaitCursor, ResumeWaitCursor, & IncrementStatusBar.
  15.          <1>     8/11/93    KBA        first checked in
  16.  
  17. */
  18.  
  19.  
  20.  
  21. #ifndef __ActionAtomHeader__
  22. #define __ActionAtomHeader__
  23.  
  24. #ifndef __Files__
  25. #include <Files.h>
  26. #endif
  27.  
  28. #ifndef __Types__
  29. #include <Types.h>
  30. #endif
  31.  
  32. #ifndef __ActionHandlerHeader__
  33. #include "ActionHandlerHeader.h"
  34. #endif
  35.  
  36.  
  37.  
  38. enum { before, after, cleanUpCancel };
  39. typedef unsigned char InstallationStage;
  40.  
  41. /* -------------------- Action Atom Format 0 and Format 1 -------------------------
  42.     NOTE:  Format 0 and 1 have Pascal calling interfaces.  You can not use Format 0 or
  43.             Format 1 with Installer 4.X in User Folder Mode.
  44. */
  45.  
  46. /* The action atom param block record contains all of the parameters that action atoms */
  47. /* receive.  The first (and only) parameter to action atoms is a ptr to this block (AAPBRecPtr) */
  48.  
  49. typedef struct {
  50.     short                targetVRefNum;
  51.     long                blessedDirID;
  52.     long                aaRefCon;
  53.     Boolean                doingInstall;
  54.     InstallationStage    whichStage;
  55.     Boolean                didLiveUpdate;
  56.     long                installerTempDirID;
  57. }AAPBRec, *AAPBRecPtr;
  58.  
  59.  
  60. /*    The function prototype for the format 0 Action Atom code is as follows */
  61.     
  62.     pascal Boolean    ActionAtomFormat0( AAPBRecPtr );
  63.     
  64.     
  65. /*    The function prototype for the format 1 Action Atom code is as follows */
  66.     
  67.     pascal long    ActionAtomFormat1( AAPBRecPtr );
  68.     
  69.  
  70.  
  71.  
  72.  
  73. /* -------------------------- Action Atom Format 2 ---------------------------------
  74.     NOTE:  Format 2 has C calling interface, and a new parameterblock.
  75. */
  76.  
  77. typedef struct {
  78.     InstallationStage    fMessageID;
  79.     Handle                fStaticDataHdl;
  80.     ProcPtr                fCallBackProcPtr;
  81.     short                fTargetVRefNum;
  82.     long                fTargetFolderDirID;
  83.     short                fSystemVRefNum;
  84.     long                fSystemBlessedDirID;
  85.     long                fRefCon;
  86.     Boolean                fDoingInstall;
  87.     Boolean                fDidLiveUpdate;
  88.     long                fInstallerTempDirID;
  89. }ActionAtom2PBRec, *ActionAtom2PBPtr;
  90.  
  91. enum {  kActionAtomResultFatalError = -1, kActionAtomResultContinue = 0, kActionAtomResultCancel = 1 };
  92. typedef long ActionAtomResult;
  93.  
  94. ActionAtomResult    ActionAtomFormat2( ActionAtom2PBPtr );
  95.  
  96.  
  97. OSErr MakeFSSpecFromFileSpecID(     CallBackProcPtr    pCallBackProcPtr,
  98.                                     short            pFileSpecID,
  99.                                     FSSpec*            pFSSpecPtr,
  100.                                     StringHandle*    pExtraPathInfo );
  101.  
  102.  
  103. void SuspendWaitCursor(     CallBackProcPtr    pCallBackProcPtr    );
  104.  
  105. void ResumeWaitCursor(     CallBackProcPtr    pCallBackProcPtr    );
  106.  
  107.  
  108. void IncrementStatusBar(     CallBackProcPtr    pCallBackProcPtr,
  109.                             short            pIncrementAmount);
  110.  
  111. #endif